<template>
	<view>
		<cu-custom :isBack="true" bgColor="bg-blue">
			<block slot="content">生产计划</block>
			<template slot="backText">
				<text class="cuIcon-back" @tap="beforePage"></text>
			</template>
		</cu-custom>
		<!-- 主题内容 -->
		<view  class="padding-t">
			<view class="public-main-info">
				<view class="u-main">
					<!-- 容器 -->
					<view class="u-font-weight7 u-solid-b-blue padding-sm font-size36">
						<text>计划号</text>
						<text class="margin-left-10">{{schid}}</text>
					</view>
					<view class="">
						<!-- 每一列 -->
						<view class="dashed-bottom padding2030" v-for="(item, index) in rolls" :key="index">
							<!-- 头部 -->
							<view class="">
								<text class="u-font-weight6 font-size24 u-font-weight">钢卷号</text>
								<text class="margin-left-10 font-size36">{{item.coilNo}}</text>
							</view>
							<view class="flex">
								<view class="basis-sm">
									<view class="order-info-list">
										<text class="u-font-weight6">钢种</text>
										<text class="margin-left-10 u-font-weight">{{item.steelType}}</text>
									</view>
									<view class="order-info-list">
										<text class="u-font-weight6">执行状态</text>
										<text class="margin-left-10 u-font-weight">{{item.state}}</text>
									</view>
								</view>
								<view class="basis-lg">
									<view class="order-info-list">
										<text class="u-font-weight6">板坯规格</text>
										<text class="margin-left-10 u-font-weight">{{item.slabSpecifications}}</text>
									</view>
									<view class="order-info-list">
										<text class="u-font-weight6">成品规格</text>
										<text class="margin-left-10 u-font-weight">{{item.productSpecifications}}</text>
									</view>
								</view>
							</view>
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import { post } from "@/lib/Util.js";
	import {GET_PLAN_DETAIL_INFO} from '@/common/api/plan.js'
	export default {
		data() {
			return {
				schid: '---',
				rolls: []
			}
		},
		onLoad(options) {
			this.schid = options.param
			this.getInfo(options.param)
		},
		methods: {
			beforePage() {
				uni.navigateBack({
					delta: 1
				});
			},
			async getInfo (val) {
				let res = await post(GET_PLAN_DETAIL_INFO, { planNumber: val })
				if(res.code == 0) {
					this.rolls = res.data
				}
			}
		}
	}
</script>

<style>
	
</style>
